import { lazy } from 'react';

import { RoutesType } from '@customTypes/customTypes';

/** 登陆后的业务路由 */
const loggedInRoutes: RoutesType[] = [
  {
    path: '/menu',
    name: '菜单设置',
    component: lazy((): Promise<any> => import('@pages/UserPermissionManagement/MenuSetting'))
  },
  {
    path: '/subfunction/:id',
    name: '菜单设置-子功能',
    component: lazy((): Promise<any> => import('@pages/UserPermissionManagement/Subfunction'))
  },
  {
    path: '/role',
    name: '角色设置',
    component: lazy((): Promise<any> => import('@pages/UserPermissionManagement/RoleSetting'))
  },
  {
    path: '/user',
    name: '用户设置',
    component: lazy((): Promise<any> => import('@pages/UserPermissionManagement/UserSetting'))
  },
  {
    path: '/dept',
    name: '部门设置',
    component: lazy((): Promise<any> => import('@pages/UserPermissionManagement/DeptSetting'))
  },
  {
    path: '/grant',
    name: '授权',
    component: lazy((): Promise<any> => import('@pages/UserPermissionManagement/GrantPermission'))
  },
  {
    path: '/dictionary',
    name: '字典设置',
    component: lazy((): Promise<any> => import('@pages/SystemManagement/DictionarySetting'))
  },
  {
    path: '/assist-search',
    name: '辅助查询',
    component: lazy((): Promise<any> => import('@pages/AssistDevelopManagement/AssistSearch'))
  },
  {
    path: '/log',
    name: '系统日志',
    component: lazy((): Promise<any> => import('@pages/SystemManagement/SysLogSetting'))
  },
  {
    path: '/setting',
    name: '系统设置',
    component: lazy((): Promise<any> => import('@pages/SystemManagement/SysSetting'))
  },
  {
    path: '/proccate',
    name: '流程分类',
    component: lazy((): Promise<any> => import('@pages/WorkFlow/ProcessCategory'))
  },
  {
    path: '/procmodel',
    name: '流程分类',
    component: lazy((): Promise<any> => import('@pages/WorkFlow/ProcessModel'))
  },
  {
    path: '/todoproclist',
    name: '待办任务',
    component: lazy((): Promise<any> => import('@pages/WorkFlow/List/TodoList'))
  },
  {
    path: '/doneproclist',
    name: '已办任务',
    component: lazy((): Promise<any> => import('@pages/WorkFlow/List/DoneList'))
  },
  {
    path: '/ownproclist',
    name: '我的流程',
    component: lazy((): Promise<any> => import('@pages/WorkFlow/List/OwnList'))
  },
  {
    path: 'job/info',
    name: '任务信息',
    component: lazy((): Promise<any> => import('@pages/JobManagement/JobInfo'))
  },
  {
    path: 'job/log',
    name: '任务信息',
    component: lazy((): Promise<any> => import('@pages/JobManagement/JobLog'))
  }
];

export default loggedInRoutes;
